Skip to main content

FreezeRows

Freezes the top row or rows of the current worksheet.

Syntax

expression.FreezeRows(count);

expression - A variable that represents a ApiFreezePanes class.

Parameters

NameRequired/OptionalData typeDefaultDescription
countOptionalNumberfalseOptional number of rows to freeze, or zero to unfreeze all rows.

Returns

This method doesn't return any data.

Example

This example freezes the the top row.

var oWorksheet = Api.GetActiveSheet();
var oFreezePanes = oWorksheet.GetFreezePanes();
oFreezePanes.FreezeRows(1);